//
//  SCNSignInViewController.swift
//  ShoucainuSwift
//
//  Created by 王家旭 on 2017/4/25.
//  Copyright © 2017年 Riluee. All rights reserved.
//

import UIKit

class SCNSignInViewController: SCNTableViewController {

    
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        self.navigationController?.setNavigationBarHidden(true, animated: true)
    }
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        self.navigationController?.setNavigationBarHidden(false, animated: true)
    }
    override func viewDidLoad() {
        super.viewDidLoad()

        let treeView = SCNSigInGoldTreeView(frame: view.frame)
        treeView.backgroundColor = .red
        treeView.backAction = {
            self.navigationController?.popViewController(animated: true)
        }
        treeView.ruleHandleAction = {
            self.loadWeb(at: self, url: "\(SCNRequestAPI.H5API)InvestTree/rule", title: "理财树规则")
        }
        view.addSubview(treeView)
        
        requestServer()
    }
    
    func requestServer() {
        // 理财树信息
        SCNRequestManager.postRequest([:], URL: SCNRequestAPI.investTree().index) { (result) in
            
        }
    }
}
